#include <stdio.h>

int square(int);

int square(int num)
{
	return num * num;
}

int main()
{	
	int num;
	int (*fp)(int);
	
	printf("请输入一个整数：");
	scanf("%d",&num);

	//函数名等于函数地址
	//fp = &square;
	fp = square;

	printf("%d * %d = %d\n",num, num, (*fp)(num)); //这么写方便阅读代码
	//printf("%d * %d = %d\n",num, num, fp(num));
	
	return 0;
}
